#ifndef __EXT_UART_H_
#define __EXT_UART_H_

#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"

#include "xil_printf.h"
#include "xparameters.h"
#include "xstatus.h"

#include "xuartlite.h"
#include "xuartlite_l.h"

typedef void * xComPortHandle;

#define EXT_UART_ID		        XPAR_UARTLITE_1_DEVICE_ID

#define EXT_UART_TX_MSG_LENGTH  1024

typedef struct{
    u16   string_length;
    char* pData;
}UartTxString;

xComPortHandle initExtUart(unsigned portBASE_TYPE uxQueueLength , QueueHandle_t eventQueue);
portBASE_TYPE xExtUartGetChar( xComPortHandle pxPort, signed char *pcRxedChar, TickType_t xBlockTime );
void vExtUartTx( char * pcMessage , u16 usStringLength);

int createPrvExtUartRxTask(QueueHandle_t xEventQueue);
int createBlockExtUartTxTask(QueueHandle_t xEventQueue);
void pushExtUartTxQueue(u8* pcMessage , u16 usStringLength);


#endif /* __EXT_UART_H_ */






